package main

import "fmt"

func main() {
	obj := student{
		name:  "花花",
		age:   18,
	}

	var h Humaner
	var g Girl
	g = &obj
	h = g
	h.sayHi()
/*	var h Humaner
	h = &obj
	h.sayHi()


	var g Girl
	g = &obj
	g.sayHi()
	g.sing("传奇")


*/


}

//子集
type Humaner interface {
	sayHi()
}

//超集
type Girl interface {
	Humaner
	sing(name string)
}

type student struct {
	name	string
	age		int
}

func (stu *student) sayHi(){
	fmt.Printf("大家好，我是%s，今年%d 岁\n",stu.name,stu.age)
}
func (stu *student) sing(name string){
	fmt.Printf("大家好，我将为大家唱歌,%s\n",name)
}